package com.eobard.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eobard.commons.entity.Employee;
import com.eobard.dao.EmployeeMapper;
import com.eobard.service.EmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Eobard_Thawne
 * @version 1.0
 * @date 2022/7/24 -17:41
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Resource
    private EmployeeMapper userMapper;

    public String getOne() {
        System.err.println("Service模块执行了");
        QueryWrapper<Employee> wrapper=new QueryWrapper();
        wrapper.eq("id",1);
        String emp1 = userMapper.selectOne(wrapper).toString();
        String emp2 = userMapper.getOne().toString();
        return emp1+"=="+emp2;
    }
}
